Control apparatus for image pickup apparatus

ABSTRACT

Provided is a control apparatus for an image pickup apparatus that can synchronize an image sensor with a frame period from an external device, such as a display apparatus, without use of any frame buffer, while optimizing the frequency of a clock signal used for the operation of the image sensor. An image sensor ( 11 ) receives a trigger signal from an external device ( 2 ), such as a display apparatus, and image data from an image sensor ( 11 ); calculates, for each frame, information of a time difference from the trigger signal to a time at which to start the output of the image data; and establishes, on the basis of the information of the time difference, a frame period of the image sensor ( 11 ) such that the time difference is accommodated within a given range, thereby allowing the image data to be supplied to the external device ( 2 ) within a given time difference relative to the trigger signal, though some degree of variation occurring in each frame.

TECHNICAL FIELD

The present invention relates to a control apparatus for an image pickupapparatus equipped with an image sensor for outputting image data of aCMOS sensor, etc., and also to a control apparatus of an image pickupapparatus for capturing a moving image in synchronization with a triggersignal from an external device, such as, e.g., a display apparatus and arecording device.

BACKGROUND ART

In cases where image data from an image pickup apparatus using an imagesensor, such as, e.g., a CMOS sensor, is displayed on a displayapparatus as a moving image, it is preferable to acquire the image datafrom the image sensor in synchronization with the timing of a framedisplay of an image in a display apparatus. When the image sensor andthe display apparatus differ in frame period, a method is known in whicha memory (frame buffer) and a memory control circuit are arranged insidethe display apparatus or between the display apparatus and the imagesensor to once store frame data (image data of one frame) and output theframe data at the timing of the frame display of the display apparatus,i.e., in synchronization with the display operation of the displayapparatus (see, e.g., Patent Document 1).

This method, however, has the following problems. It is required tostore image data of one frame to several frames in a memory. This notonly requires a large-capacity memory, which increases the deviceconfiguration size, but also requires a complicated circuit, whichincreases the cost. Further, display delay occurs due to the timerequired for the writing or reading operation with respect to the memory(frame buffer).

Further, when acquiring the same image by a plurality of image sensors,although it is preferable to synchronize the image acquisition timings(frame timings) of the plurality of image sensors. However, it isdifficult to do so in the aforementioned method.

Among image sensors, there exists an image sensor having a mode calledexternal trigger mode other than an internal frame synchronous operationmode (VIDEO mode) with a fixed timing of the inside of the image sensor.In this external trigger mode, since a synchronous operation by theexternal trigger can be performed, the frame memory as described abovebecomes unnecessary.

In some image sensors, however, there exist an sensor not having anexternal trigger mode and an sensor having an external trigger mode butits function is limited (for example, it cannot perform overlap thatsimultaneously performs exposure and image output of the previous frameand therefore speeding up cannot be performed). In such a sensor, evenif it is good in performance, the sensor should be used in the internalframe synchronous operation mode (VIDEO mode), and therefore it wasnecessary to resynchronize using a frame buffer and a memory control.

Further, as a method not using a frame buffer, conventionally, a methodis known in which a frequency of an operation clock of an image sensoris determined and generated from a period of a frame synchronizationsignal on an external device side and the number of clocks required forone frame, i.e., an operation clock of the image sensor is set to afrequency corresponding to the frame period of the external device (see,e.g., Patent Document 2). In some image sensors, however, there exists adevice requiring a clock input of a recommended frequency to obtain afavorable performance. For such an image sensor, it is impossible toapply such a method.

PRIOR ART DOCUMENT Patent Document

Patent Document 1: Japanese Unexamined Patent Application PublicationNo. H11-296155

Patent Document 1: Japanese Unexamined Patent Application PublicationNo. 2001-228816

SUMMARY OF THE INVENTION Problems to be Solved by the Invention

The present invention was made to solve various problems of theaforementioned prior arts, and aims to provide a control apparatus foran image pickup apparatus capable of synchronizing an image sensor witha frame period from an external device without using a complicatedcircuit, such as, e.g., a frame buffer and a control circuit, whilemaking a frequency of an operation clock of the image sensor as arecommended frequency, even if the image sensor does not have anexternal trigger mode or is substantially unable to apply an externaltrigger mode.

Means for Solving the Problems

In order to solve the aforementioned problems, a control apparatus foran image pickup apparatus according to the present invention ischaracterized in that a control apparatus for an image pickup apparatusequipped with an image sensor for outputting image data, includes:

external trigger signal receiving means configured to receive a triggersignal from an external device to which the image data is output;

image data receiving means configured to receive the image data from theimage sensor;

time difference calculation means configured to calculate information ofa time difference from the trigger signal to a time point at which theimage sensor initiates an output of the image data for each frame, basedon respective received results of the external trigger signal receivingmeans and the image data receiving means; and

frame period set means configured to set a frame period of the imagesensor,

wherein the frame period set means is configured to set a frame periodof the image sensor so that the time difference falls within a givenrange, on a basis of the information of the time difference calculatedby the time difference calculation means.

In the present invention, it may be configured such that the frameperiod of the image sensor is capable of setting only at a specifiedtime unit, and

wherein the time difference calculation means includes

trigger period measurement means configured to measure a time from atime point of receiving a last trigger signal every time the triggersignal is received,

frame period measurement means configured to measure a time from aninitiation time point of receiving the last image data every initiationof receiving the image data from the image sensor,

period difference calculation means configured to calculate a perioddifference between the trigger period and the frame period, and

period difference accumulation means configured to accumulate the perioddifference calculated by the period difference calculation means foreach frame,

wherein a cumulative value of the period difference calculated by theperiod difference calculation means is used as the information of thetime difference, and

wherein the frame period set means compares the cumulative value of theperiod difference and a threshold, and uses a compared result as onecondition of setting change of the frame period of the image sensor.

Further, in the present invention, it is possible to employ a structurein which the control apparatus further includes:

a buffer configured to temporality store the image data from the imagesensor;

write control means configured to control writing to the buffer; and

read control means configured to control reading from the bugger,

wherein the write control means performs writing to the buffer at animage data output timing of the image sensor, and

wherein the read control means performs reading of the image data fromthe buffer at a timing later than a timing of the writing in a state inwhich a time difference from the trigger signal to the output initiationof the image data is maximum.

The present invention is sought to solve the problems by receiving atrigger signal from an external device and image data from an imagesensor, monitoring a time difference from the trigger signal to anoutput initiation timing of the image data from the image sensor foreach frame, and automatically setting the frame period of the imagesensor so that the time difference falls within a given range.

That it is, without fixing a frame period of the image sensor to aninitially set period, the time difference from the trigger signal fromthe external device to an output initiation time point of the image datafor each frame is monitored, and the setting of the frame period of theimage sensor is changed as needed so that the time difference fallswithin a given range. With this, although there is some degree ofvariation with respect to the trigger signal, the output of the imagedata is initiated within a given time range. Thus, even in an imagesensor not equipped with an external trigger mode, it is possible toessentially realize an external trigger synchronization.

Here, in many cases, normally, setting of a frame period of an imagesensor can be performed by a prescribed time unit, for example, a timeunit corresponding to one line period (period for transferring imagedata of one line in the horizontal direction of the image), andtherefore a period of an external trigger signal and a frame period ofthe image sensor cannot be matched completely. Therefore, as a specificmethod of the frame period set operation, a method may be employed inwhich the period difference between the trigger period and the frameperiod is obtained for each frame, the period difference is accumulated,using that the cumulative value corresponds to the time difference fromthe trigger signal to the image data output initiation time point, thecumulative value and a given threshold are compared, and the comparedresult is set as one condition of the period setting change.

That is, a frame period of an image sensor can be set only by a timeunit corresponding to one line period, and therefore a slight differenceoccurs inevitably between the frame period and the trigger period, whichgradually causes shifting of the time difference from the trigger signalto the image data output initiation time point for each frame. This isgrasped by the cumulative value of the period difference of bothperiods. When the cumulative value exceeds a given limit, the frameperiod set change is executed and the operation for returning theshifting is repeated. With this, the time difference from the triggersignal to the output initiation time point of the image data can be setwithin about a range of time corresponding to several line periods.

Further, as described above, the time difference from the trigger signalto the output initiation of the image data from the image sensor can beset within a given range although there are some degree of variations bythe present invention. However, in cases where no variation of theoutput timing of the image data to the trigger signal is allowed, thefollowing configuration may be employed.

That is, a buffer for accumulating image data and write and read controlmeans are added. Writing of the image data to the buffer is performed atthe timing of the image sensor. Reading of the image data from thebuffer is performed at the timing having a given time difference withrespect to the trigger signal which is later than the timing that theoutput initiation timing of the image data with respect to the triggersignal becomes latest. With this, the image data can be output at atiming stable to the trigger signal. It is sufficient that the bufferhas a capacity capable of storing for the maximum time from the triggersignal to the output initiation time point of the image data, or thedata corresponding to several lines in the aforementioned example.

Effects of the Invention

According to the present invention, the time difference from the triggersignal from an external device to the output initiation of the imagedata from the image sensor is monitored for each frame, and settingchange of the frame period of the image sensor is performed sequentiallyso that the time difference falls within a given range. Although thereare some degree of variation in time difference from the trigger signalfrom the external device to the output initiation of the image data, itis possible to output the image data essentially in synchronization withthe trigger signal from the external device. That is, even in the caseof using an image sensor not having an external trigger mode, it ispossible to realize an external trigger synchronization withoutproviding a frame buffer and without specially changing the frequency ofthe operation clock of the image sensor.

Further, in cases where no variation of the output timing of the imagedata to the trigger signal is allowed, by providing a memory capable ofaccumulating image data of several lines and write and read controlmeans, writing the image data at the timing of the image sensor, andtransmitting the image data to the external device by reading at atiming later than a state in which the time difference from the triggersignal to the output initiation of the image data becomes maximum, it ispossible to output the image data at a timing stable to the triggersignal.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a structural view showing a state in which an image pickupapparatus according to the present invention is connected to an externaldevice.

FIG. 2 is a block diagram showing a configuration example of a sensorcontrol unit shown in FIG. 1.

FIG. 3 is a block diagram showing a configuration example of a triggersynchronization control unit shown in FIG. 2.

FIG. 4 is a timing chart showing an operation of a triggersynchronization control unit.

FIG. 5 is a flowchart showing an operation of a CPU when an interruptionsignal is received.

FIG. 6 is an explanatory view showing an operation example of asynchronous control according to an embodiment of the present invention.

FIG. 7 is a block diagram showing a configuration example of an imageinput unit shown in FIG. 2.

FIG. 8 is a timing chart showing an operation of the image input unit.

EMBODIMENTS FOR CARRYING OUT THE INVENTION

Hereinafter, embodiments of the present invention will be described withreference to drawings.

FIG. 1 is a bock diagram showing a structure of an image pickupapparatus according to an embodiment of the present invention in a statein which the image pickup apparatus is connected to an external device,such as, e.g., a display apparatus and a recording apparatus.

The image pickup apparatus 1 is constituted by an image sensor 11 suchas a CMOS sensor, an optical lens 12 for forming an object image on alight receiving surface of the image sensor 11, a sensor control unit 13for controlling the image sensor 11, and a crystal oscillator 14 forsupplying a reference clock to the sensor control unit 13 as maincomponents.

The external device 2 is a display apparatus or a video recordingapparatus (recording device), and the external device 2 and the imagepickup apparatus 1 are connected by an image data transfer cable, suchas, e.g., a CameraLink. In order to synchronize the image sensor withthe display timing or recording timing, a trigger signal showing theinitiation timing of each image output (frame output) is supplied to thesensor control unit 13 from the external device 2.

The image sensor 11 includes an A-D converter in addition to atwo-dimensional image pickup element, and transmits object imageinformation formed on the light receiving surface of the image pickupelement as digital data. In the image sensor 11, the reset of storagecapacitance, the accumulation of charges, the sampling, and the A-Dconversion are controlled in a line unit, and the output of the imagedata of each line is controlled in a pixel unit. These controls areperformed by creating timing signals, such as, e.g., a horizontalsynchronization signal and a vertical synchronization signal, in theimage sensor 11 on a basis of the clock supplied from the sensor controlunit 13 which will be described later and performing an operation basedon the timing signals. The image data to be output is sent to the sensorcontrol unit 13 with timing signals of a vertical synchronization signaland a horizontal synchronization signal.

The clock to the image sensor 11 is supplied from the sensor controlunit 13 as described above. The clock to be supplied to the image sensor11 and the clock for operating the internal circuit of the sensorcontrol unit 13 are generated by the crystal oscillator 14 connected tothe sensor control unit 13. In this embodiment, although the clock issupplied from the sensor control unit 13 to the image sensor 11, theclock may be directly supplied from the crystal oscillator 14 to theimage sensor 11.

The image sensor 11 and the sensor control unit 13 are connected bycommunication signals, and the communication signals are used to set thetiming, etc., of the image sensor 11. This timing setting includessetting of the frame period, and the image sensor 11 performs outputtingof the image data of each frame at the timing of the set frame period.

In this sensor control unit 13, as will be detailed later, the timedifference from the timing of the trigger signal input from the externaldevice 2 to the timing of output initiation of the image data from theimage sensor 11 is monitored for each frame to set the frame period ofthe image sensor 11 so that the time difference falls within a givenrange. With this control, the time difference from the trigger signal tothe output initiation of the image data falls within the given rangealthough there are some degree of variation for each frame. That is, itbecomes possible to perform controlling substantially corresponding toexternal trigger synchronization. In this embodiment, further, the imagedata is written to the memory at the timing of the image sensor 11 and acountermeasure is taken such that reading of memory is performed at thetiming later than the timing of the frame that the image outputinitiation was performed at the latest timing to the trigger timing, sothat it becomes possible to output the image data to the external device2 at a timing stable to the trigger signal.

A configuration example of the sensor control unit 13 is shown by ablock diagram in FIG. 2. The sensor control unit 13 includes a triggersynchronization control unit 21, an image input unit 22, an image outputunit 23, a communication control unit 24, and a CPU 25.

The image input unit 22 receives image data from the image sensor 11.This image input unit 22 is equipped with a memory capable of storingimage data of several lines, and is configured to store the input imagedata at the timing from the image sensor 11, read out the image datastored on the basis of the trigger signal at the timing generated by theimage input unit 22, and output the image data. Specific configurationexample of this image input unit 22 will be described later.

The image data output from the image input unit 22 is input to the imageoutput unit 23. The image output unit 23 is structured by an interfacefor outputting the image data to the external device 2 shown in FIG. 1,and is configured to output the input image data by converting it into aCameraLink signal format and signal level. In the example shown in FIG.2, although the image input unit 22 and the image output unit 23 aredirectly connected, it may be configured such that an image processingunit is provided between the image input unit 22 and the image outputunit 23 to perform image processing, such as, e.g., γ correction anddefect correction.

The communication control unit 24 is connected to a CPU 25, and isconfigured to perform an access to a setting register of the imagesensor 11 depending on an access request to the image sensor 11 from theCPU 25. Specifically, it performs operations respectively correspondingto the register address, a write or read request to the image sensor 11sent from the CPU 25. At the time of a write request, the communicationcontrol unit 24 writes data, generates a signal in accordance with theaccess system (in this example, SPI bus) of the image sensor 11 andoutput it. At the time of a read request, the communication control unit24 receives read data sent from the image sensor 11 and outputs the readdata to the CPU 25.

In the trigger synchronization control unit 21, a trigger signal fromthe external device 2 is input, and a valid section signal, which is atiming signal sent along with the image data from the image sensor 11,is input. Further, the trigger synchronization control unit 21 isconnected to the CPU 25 by a bus, so that the CPU 25 can read the resultcalculated by the trigger synchronization control unit 21. Further, thetrigger synchronization control unit 21 outputs an interruption signalto the CPU 25, so that the timing that the calculation is complete canbe notified to the CPU 25. And, as described later, the triggersynchronization control unit 21 monitors the trigger signal input fromthe external device 2 and the output initiation timing of the frame dataof the image sensor 11 and performs the calculation of the timedifference (the number of clocks) from the trigger signal to the imagedata output initiation timing.

A block diagram showing a configuration example of the triggersynchronization control unit 21 is shown in FIG. 3, and a time chartshowing the operation of trigger synchronization control unit 21 isshown in FIG. 4.

The trigger signal (FIG. 4(b)) from the external device is input to thetrigger period count unit 31. The trigger period count unit 31 detectsthe rising edge of the trigger signal, counts the period (the number ofclocks) from the previous rising edge, and outputs the result in thetime domain shown in FIG. 4(c) as a trigger period. Specifically, thetrigger period count unit 31 detects the rising timing of the triggersignal, and holds the current counter value when the rising timing isdetected, and clears the counter value after the output. Further, whenthe rising timing is not detected, the trigger period count unit 31counts up at the rising of the clock as long as the counter value doesnot become the maximum value (in this example, Oxffffff since thecounter is 24 bit). The trigger signal in this example is a high activesignal. Further, the trigger signal is generated by the external device2, and therefore the trigger signal is asynchronous with the internalclock of the FPGA constituting the trigger synchronization control unit21. For this reason, the trigger signal is subjected to a metastablecountermeasure by an internal clock synchronization circuit (notillustrated), and a signal after being synchronized with the internalclock is used.

The valid section signal (FIG. 4(d)) output from the image sensor 11 isinput to the sensor period count unit 32. The sensor period count unit32 detects the rising edge of the valid section signal, counts theperiod (the number of clocks) from the previous rising edge, and outputsthe result in the time domain shown in FIG. 4(g) as a sensor period.Specifically, the sensor period count unit 32 performs the risingdetection of the valid section signal, holds the current count valuewhen the rising is detected, and clears the current count value afterthe output. Further, when the rising is not detected, the count unitcounts up at the rising of the clock as long as the counter value doesnot become the maximum value (in this example, Oxffffff since thecounter is 24 bit). Further, the sensor period count unit 32 outputs anoutput initiation signal (FIG. 4(f)) that asserts only when the risingof the valid section signal is detected. The valid section signal inthis example is a high active signal, and the rising edge shows theoutput initiation timing of the image sensor 11. Further, the validsection signal is generated by the image sensor 11. Therefore, the validsection signal is synchronized with the clock of the image sensor 11 andis asynchronous with the internal clock of the FPGA constituting thetrigger synchronization control unit 21. For this reason, the validsection signal is subjected to a metastable countermeasure by aninternal clock synchronization circuit (not illustrated), and a signalafter being synchronized with the internal clock is used.

The trigger period and the sensor period measured as described above areinput to a period difference calculation unit 33. The period differencecalculation unit 33 subtracts the sensor period from the trigger period,and outputs the value as a period difference of the most recent frame inthe time domain shown in FIG. 4(h). In some cases, this perioddifference is negative.

The period difference of the most recent frame is input to a perioddifference cumulative calculation unit 34, added to an internally heldcumulative value of the period difference only when the aforementionedoutput initiation signal (FIG. 4(f) is asserted, and output to the CPU25 in the time domain shown in FIG. 4(i) as a cumulative value of theperiod difference of the trigger period and the sensor period. In somecases, this period difference is negative. The cumulative value of thisperiod difference becomes information showing the time difference fromthe timing of the trigger signal of the most recent frame to the timingof the sensor output initiation.

To notify the completion of the calculation of the period differencecumulative value of the CPU 25, the interruption signal creation unit 35asserts the interruption signal (FIG. 4(j)) at the timing when theoutput initiation signal is asserted, and notifies the CPU 25.

When the CPU 25 received the interruption signal from the triggersynchronization control unit 21, the CPU 25 reads the cumulative valueof the period difference output from the trigger synchronization controlunit 21 and compares it with a previously set value to determine a setvalue of the frame period of the image sensor 11, and then update theset value of the frame period of the image sensor 11. The operation flowof the CPU 25 when the CPU 25 received the interruption signal is shownin FIG. 5. Here, it is assumed that the frame period of the image sensor11 in this example can be set in time unit corresponding to one lineperiod.

In the CPU 25, a threshold Th of a period difference cumulative value, aframe period setting maximum value Tmax, and a frame period set minimumvalue Tmin are set in advance. Further, as the current frame period setvalue Tnow, an initial value of a frame period is set. Further, the samevalue is set in the register of the frame period of the image sensor 11.The threshold Th is a clock unit and is a positive value. The frameperiod set maximum value Tmax and minimum value Tmin, and the currentframe period set value Tnow are each one line period unit of the imagesensor 11 and these are all positive values. Each of these values is setat the time of initial operation, which will be described.

As shown in FIG. 5, when the CPU 25 receives an interruption signal, theCPU 25 reads the frame period difference cumulative value Ttotal outputfrom the trigger synchronization control unit 21. And the CPU 25compares the frame period difference cumulative value Ttotal and thethreshold Th. When the frame period difference cumulative value Ttotalis equal to or larger than the threshold Th, the CPU 25 compares thecurrent frame period set value Tnow of the image sensor 11 and the frameperiod set maximum value Tmax. When the current frame period set valueTnow does not exceed the maximum value Tmax, the frame period set valueTnow is increased by the time of one line (settable one unit). When theframe period difference cumulative value Ttotal is smaller than thethreshold Th, or when the current frame period set value Tnow is equalto or larger than the maximum value, the CPU 25 subsequently comparesthe frame period difference cumulative value Ttotal and a valuemultiplied by −1 to the threshold Th. When the frame period differencecumulative value Ttotal is equal to or smaller than the threshold −Th,the CPU 25 compares the frame period set value Tnow and the frame periodset minimum value Tmin. When the frame period set value Tnow is largerthan the minimum value Tmin, the CPU decreases the frame period setvalue Tnow by the time of one lone. When the frame period differencecumulative value Ttotal is larger than the value multiplied by −1 to thethreshold Th, or when the frame period set value Tnow is equal to orsmaller than the minimum value Tmin, the value of the frame period setvalue Tnow is used as it is. Thereafter, the CPU 25 writes the frameperiod set value Tnow determined as described above to the register ofthe frame period of the image sensor 11 via the communication controlunit 24. After completion of writing to the register, the CPU 25 againwaits for the generation of interruption.

The interruption signal is generated every time the head image data ofeach frame is input, the setting of the frame period of the image sensor11 is performed for each frame.

One example of an actual synchronous control setting and operation isshown in FIG. 6. Hereinafter, the explanation will be made withreference to the Table of FIG. 6. In this example, the frame rate of theexternal device 2 is 60 fps, the trigger signal is asserted every 16.666ms. The one line period of the image sensor 11 is fixed to 15.72 μs bythe specification of the sensor, the clock frequency of FPGAconstituting the trigger synchronization control unit 21 is 100 MHz. Forthis reason, when converted into the number of clocks of FPGA, one lineperiod of the image sensor 11 becomes 1,572 clocks, and the triggerperiod becomes 1,666,667 clocks. Actually, since the trigger signal isnot synchronized with the clock of FPGA, the value may shift dependingon the frame. However, to simplify the explanation, it is assumed thatthe period of the trigger is fixed at 1,666,667 clocks.

As the initial setting operation of the synchronous control, the periodof the trigger signal is divided by the period of one line of the imagesensor 11, and the obtained value is set as an initial value of theframe period set value Tnow of the image sensor 11. Specifically,1,666,667 clocks÷1,572 clocks=1,060 lines (truncated after the decimalpoint) is stored as the initial value (frame set value Tnow) of theimage sensor 11 and written in the register of the frame period of theimage sensor 11. When the frame period set register contents areupdated, in the image sensor 11, a set value of a new frame period isreflected at the next frame time after the update. Further, a valueadded by 1 to the initial value of the aforementioned frame period setvalue Tnow (1,060+1=1,061) is substituted to the frame period setmaximum value Tmax, and the frame period set value Tnow as it issubstituted to the frame period set minimum value Tmin. Further, as thethreshold Th, a value obtained by dividing the period of one line of theimage sensor 11 by 8 (1,572÷8=196) is substituted.

After performing the aforementioned setting, an external triggeroperation is initiated. In the initial first frame, the initial value ofthe frame period set value Tnow of the image sensor 11 is 1,060 lines,and therefore the sensor period is 1,060 lines×1,572 clocks=1,666,320clocks (see the column of “frame No. 1: sensor period”). For thisreason, the difference between the trigger period and the sensor periodbecomes 1,666,667 clocks=1,666,320 clocks=347 clocks (see the column of“frame No. 1: period difference”). Since this is a first frame, theframe period difference cumulative value Ttotal becomes 347 clocks as itis (see the column of “frame No. 1: cumulative period difference”).Since this frame period difference cumulative value Ttotal is largerthan the threshold Th, and when the frame period set value Tnow issmaller than the maximum value Tmax, the frame period set value Tnow ofthe image sensor 11 is increased by 1 and the content of the register isupdated.

In the second frame, since the frame period set value Tnow updated inthe first frame will be reflected only at the time of the next frameoperation, the update result has not been reflected yet, and the frameperiod of the image sensor 11 has no change and the period differencebecomes the same as in the first frame. Therefore, the frame perioddifference cumulative value Ttotal becomes 693 clocks (see the column“frame No. 2: cumulative period difference”), which is larger than thethreshold Th. However, the frame period set value Tnow does not becomesmaller than the maximum value Tmax, and therefore the frame period setvalue Tnow remains as it is.

In the third frame, since the frame period set value Tnow set in thefirst frame is reflected, it becomes 1,061 lines×1,572 clocks=1,667,892clocks (see the column of “frame No. 3: period difference”), and theperiod difference becomes 1,666,667 clocks−1,667,892 clocks=−1,225clocks (see the column “frame No. 3: period difference). Since theperiod difference cumulative value Ttotal becomes −532 (see the column“frame No. 3: cumulative period difference”), which is smaller than thevalue multiplied by −1 to the threshold Th. Further, the perioddifference cumulative value Ttotal is larger than the frame period setminimum value Tmin, and therefore the register setting is performed bysubtracting the frame period set value Tnow by 1.

The aforementioned operation is performed in the same manner in thefourth frame and thereafter. As the results of the all 25 frames in FIG.6 show, the control is performed so that the frame period differencecumulative value Ttotal falls within a given range. This frame perioddifference cumulative value Ttotal becomes information showing the timedifference from the trigger signal and the frame output initiationtiming of the image sensor 11. The frame in which the frame perioddifference cumulative value Ttotal is the largest value indicates thatthe output timing of the image sensor 11 is early, and the frame inwhich the frame period difference cumulative value Ttotal is thesmallest value indicates that the output timing of the image sensor 11is late. For this reason, the value obtained by subtracting the minimumvalue from the maximum value of the period difference cumulative valueshows the maximum value of time difference variation from the triggersignal and the frame output timing of the image sensor 11. In thisexample, since the period of one line of the image sensor 11 is 1,572clocks, it can be confirmed that it is within the variation of threelines.

By the operations of the trigger synchronization control unit 21, theCPU 25, and the communication control unit 24, it becomes possible toperform an external trigger synchronization that performs the image dataoutput initiation of the image sensor 11 within a certain time rangewith respect to the trigger signal from the external device 2, such as,e.g., an image display apparatus and an image recording apparatus. Inthis embodiment, a memory is further provided in the image input unit22, so that the image data from the image sensor 11 can be output at astable timing with respect to the trigger signal from the externaldevice 2.

A configuration example of the image input unit 22 is shown by a blockdiagram in FIG. 7. In this example, using a dual port SRAM 41 as abuffer, a write control unit 42 is connected to the write-only port, theimage data and the timing signal from the image sensor 11 are input tothe write control unit 42, and an image output unit 23 is connected tothe read-only port of the SRAM 41 via the read control unit 43.

The write control unit 42 generates a write address of the SRAM 41, awrite control signal, and write data in response to the input timingsignal. Specifically, at the time of asserting the valid section signalfrom the image sensor 11, the write control unit 42 outputs the imagedata as SRAM write data, asserts the write control signal of the SRAM41, and increments the write address of the SRAM 41 every time writingis performed. As described above, the image data is written to the SRAM41 at the timing of the image sensor 11.

A trigger signal output from the external device 2, such as, e.g., animage display apparatus and an image recording apparatus, is input tothe timing signal generation unit 44. In this timing signal generationunit 44, it generates a timing signal that matches the specification ofthe external device 2 on the basis of the trigger signal. The generatedtiming signal is input to the read control unit 43, and this readcontrol unit 43 generates the read address of the SRAM 41 and a readsignal depending on the input timing signal. Specifically, when thetiming signal is asserted, the read control unit 43 asserts the readcontrol signal of the SRAM 41, receives the read data, and incrementsthe read address of the SRAM 41 every time a read request is performed.As described above, the data stored in the SRAM 41 is read based on thetrigger signal from the external device 2 and output together with thetiming signal.

A timing chart of an operation of the image input unit 22 is shown inFIG. 8. On the basis of the trigger signal from the external device 2,image data of each frame is input from the image sensor 11. Depending onthe external trigger synchronous operation, there is a time differencefrom the trigger signal to the image data output initiation of the frameas described above. A signal of a frame output earliest relative to thetrigger signal of FIG. 8(a) is shown in FIGS. 8(b) and 8(c), and asignal output latest relative to the trigger signal is shown in FIGS.8(e) and 8(f). The signal processing in each case will be describedbelow.

Writing to the SRAM 41 is performed in accordance with the timing of theimage sensor 11 of each frame as described above. That is, in the caseof the frame output earliest, the writing is performed at the timingshown in FIG. 8(d), and in the case of the frame output latest, thewriting is performed at the timing shown in FIG. 8(g). The timing signalgeneration unit 44, as shown in FIG. 8(h), initiates the timing signalfor the external device 2 at the timing later than the image outputinitiation timing of the frame that the image sensor 11 output latest onthe basis of the trigger signal. With this signal, the image data storedin the SRAM 41 is read and output. The initiation of this timing signalis always a constant timing from the trigger signal. For this reason,the image signal can be transmitted to the external device 2 at a stabletiming relative to the trigger signal. The capacity of the dual portSRAM 41 requires an accumulation amount of more than the data amountcorresponding to the variation of the time difference from the triggersignal to the output initiation of the image sensor 11 (time from theframe output earliest to the output initiation of the frame outputlatest). In the example shown in FIG. 6, since the variation issuppressed three lines or less, in this example, it will be sufficientif there is a capacity capable of storing data of three to four lines.

According to the aforementioned embodiment of the present invention, bymonitoring the time difference from the trigger signal from the externaldevice 2, such as, e.g., an image display apparatus and an imagerecording apparatus, to the output initiation timing of the image datafrom the image sensor 11 and setting the frame period of the imagesensor so that the time difference falls within a given range, althoughthere is some degree of variation in the time difference from thetrigger signal to the output initiation of the image data, the timedifference can be set within the given range, which makes it possible toperform controlling corresponding to the external triggersynchronization.

Further, by proving a memory (SRAM 41) for temporarily storing imagedata, and its circuits for a write control unit 42 and a read controlunit 43 to perform writing of the image data to the memory at the timingof the image sensor 11 and reading the memory at a given timing laterthan the timing of the frame performed the image output initiationlatest relative to the trigger signal, it becomes possible to outputimage data at a stable timing relative to the trigger signal.

In the aforementioned embodiment, a part of the operation of the triggersynchronous control is realized by mounting the CPU 25. However, thepart may be realized by a hardware performing the same calculation.

In the aforementioned example, the period of the image output of theimage sensor is calculated by monitoring the timing signal of the imagedata. However, it may be calculated from the integration of a known oneline period of the image sensor 11 and a frame period set value.

Further, the time difference from the trigger signal to the outputinitiation timing of the image data from the image sensor 11 iscalculated from the cumulative value of each of the period differences.However, it may be configured to measure the time from the triggersignal to the image data output initiation for each frame.

DESCRIPTION OF SYMBOLS

-   1 image pickup apparatus-   2 external device (display apparatus/recording apparatus)-   11 image sensor-   12 optical lens-   13 sensor control unit-   14 crystal oscillator-   21 trigger synchronization control unit-   22 image input unit-   23 image output unit-   24 communication control unit-   25 CPU-   31 trigger period count unit-   32 sensor period count unit-   33 period difference calculation unit-   34 period difference cumulative calculation unit-   35 Interruption signal creation unit-   41 SRAM-   42 write control unit-   43 read control unit-   44 timing signal generation unit

The invention claimed is:
 1. A control apparatus for an image pickupapparatus equipped with an image sensor for outputting image data,comprising: external trigger signal receiving means configured toreceive a trigger signal from an external device to which the image datais output; image data receiving means configured to receive the imagedata from the image sensor; time difference calculation means configuredto calculate information of a time difference from the trigger signal toa time point at which the image sensor initiates an output of the imagedata for each frame, based on respective received results of theexternal trigger signal receiving means and the image data receivingmeans; and frame period set means configured to set a frame period ofthe image sensor, wherein the frame period set means is configured toset a frame period of the image sensor so that the time difference fallswithin a given range, on a basis of the information of the timedifference calculated by the time difference calculation means.
 2. Thecontrol apparatus for an image pickup apparatus as recited in claim 1,wherein the frame period of the image sensor is capable of setting onlyat a specified time unit, wherein the time difference calculation meansincludes trigger period measurement means configured to measure a timefrom a time point of receiving a last trigger signal every time thetrigger signal is received, frame period measurement means configured tomeasure a time from an initiation time point of receiving the last imagedata every initiation of receiving the image data from the image sensor,period difference calculation means configured to calculate a perioddifference between the trigger period and the frame period, and perioddifference accumulation means configured to accumulate the perioddifference calculated by the period difference calculation means foreach frame, wherein a cumulative value of the period differencecalculated by the period difference calculation means is used as theinformation of the time difference, and wherein the frame period setmeans compares the cumulative value of the period difference and athreshold, and uses a compared result as one condition of setting changeof the frame period of the image sensor.
 3. The control apparatus for animage pickup apparatus as recited in claim 1, further comprising: abuffer configured to temporality store the image data from the imagesensor; write control means configured to control writing to the buffer;and read control means configured to control reading from the bugger,wherein the write control means performs writing to the buffer at animage data output timing of the image sensor, and wherein the readcontrol means performs reading of the image data from the buffer at atiming later than a timing of the writing in a state in which a timedifference from the trigger signal to the output initiation of the imagedata is maximum.
 4. The control apparatus for an image pickup apparatusas recited in claim 2, further comprising: a buffer configured totemporality store the image data from the image sensor; write controlmeans configured to control writing to the buffer; and read controlmeans configured to control reading from the bugger, wherein the writecontrol means performs writing to the buffer at an image data outputtiming of the image sensor, and wherein the read control means performsreading of the image data from the buffer at a timing later than atiming of the writing in a state in which a time difference from thetrigger signal to the output initiation of the image data is maximum. 5.A method for controlling an image pickup apparatus equipped with animage sensor that outputs image data, comprising: receiving a firsttrigger signal from an external device to which the image data isoutput; receiving first image data from the image sensor; for each frameof plural frames of the image data, calculating information of a firsttime difference from the first trigger signal to a time point at whichthe image sensor initiates an output of the first image data, based onthe receiving of the first trigger signal and the receiving of the firstimage data; and changing a frame period of the image sensor so that asecond time difference falls within a given range on a basis of theinformation of the first time difference.
 6. The method of claim 5,wherein the calculating information of a first time differencecomprises: determining a trigger period by measuring a time from a timepoint of receiving a last trigger signal every time the trigger signalis received, determining a frame period by measuring a time from aninitiation time point of receiving the last image data every initiationof receiving the image data from the image sensor, calculating a perioddifference between the trigger period and the frame period, andaccumulating each of the period difference calculated by the perioddifference calculation means for each frame to obtain a cumulativevalue, wherein the cumulative value is used to determine the informationof the first time difference, and wherein changing the frame period ofthe image sensor is responsive to comparing the cumulative value to athreshold.
 7. The method of claim 6, further comprising: temporarilystoring the image data received from the image sensor in a buffer at animage data output timing of the image sensor, and reading the image datafrom the buffer in response to a time difference between the triggersignal to an output initiation of the image data being maximum.
 8. Themethod of claim 5, further comprising: temporarily storing the imagedata received from the image sensor in a buffer at an image data outputtiming of the image sensor, and reading the image data from the bufferin response to a time difference between the trigger signal to an outputinitiation of the image data being maximum.